<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html" indent="yes"/>
    <xsl:template match="/">

        <xsl:choose>
            <xsl:when test="count(//account) = 0">
                Pas de compte !!
            </xsl:when>
            <xsl:otherwise>

        <table class="listeComptes">
            <tr>
                <td><b>Nom compte</b></td>
                <td><b>Adresse</b></td>
                <td><b>Naissance</b></td>
                <td><b>Solde</b></td>
                <td><b>Actions</b></td>
            </tr>

        <xsl:for-each select="//account">
             <tr>
                <td><xsl:value-of select="concat(name, ' ', surname)" /></td>
                <td><xsl:value-of select="address" /></td>
                <td><xsl:value-of select="birthdate" /></td>
                <td><xsl:value-of select="concat(balance, ' ', balance/@currency)" /></td>
                <td>
                    <a style="padding:9px;" href="{concat('../secured/AccountMgt.do?id=', @id)}"><img border="0" src="../images/edit.gif"></img></a>
                    <a style="padding:9px;" href="{concat('../secured/RemoveAccount.do?id=', @id)}"><img border="0" src="../images/delete.gif"></img></a>
                </td>
            </tr>
        </xsl:for-each>
        </table>
        </xsl:otherwise>
        </xsl:choose>
    </xsl:template>
</xsl:stylesheet>